package sh.grapendaal.tsuushin.module.uno.engine.event;

import sh.grapendaal.tsuushin.module.uno.engine.domain.Playable;
import sh.grapendaal.tsuushin.module.uno.engine.dto.GameAction;
import sh.grapendaal.tsuushin.module.uno.engine.dto.GameState;
import sh.grapendaal.tsuushin.module.uno.engine.dto.PlayerState;

public class GameEvent extends Event {

	private static final long serialVersionUID = -3464374119134887913L;

	private GameAction type;
	private GameState gameState;

	public GameEvent(GameAction type, GameState gameState) {
		this.type = type;
		this.gameState = gameState;
	}

	public GameAction getType() {
		return this.type;
	}

	public GameState getGameState() {
		return gameState;
	}

	public PlayerState getPlayerState() {
		return getGameState().getCurrentPlayer();
	}

	public Playable getPlayed() {
		return getGameState().getPlayed();
	}
}
